<script>
	class AppError extends Error {
		constructor(arg) {
			super(arg)
			this.name = "AppError"
		}
	}
	export default {
		onLaunch: function() {
			console.log('App Launch');
			// return this.$u.api.getConfig()
			// 	.then(res => {
			// 		if (0 == res.code) {
			// 			//清除配置的数据
			// 			this.vuex_setconfig({
			// 				data: {
			// 					default_store_id: ''
			// 				},
			// 			})
			// 			throw new AppError('请在后台配置门店数据，至少有一个门店')
			// 		}
			// 		this.vuex_setconfig(res)
			// 	})
		},
		onShow: function() {
			// console.log('App Show');
		},
		onHide: function() {
			// console.log('App Hide');
		},
		onError(e) {
			if (e instanceof AppError) {
				uni.showModal({
					title: '提示',
					content: e.message,
				});
			}
		}
	};
</script>

<style lang="scss">
	@import 'uview-ui/index.scss';
	//引入字体图标库
	@import "./static/css/iconfont.css";
	@import "./static/css/base.scss";
	@import "./static/css/var.scss";
	@import "./static/css/bootstrap-grid.css";
	
	.no_record_center {
		display: flex;
		flex-direction: column;
		height: 100%;
		justify-content: center;
	}
	 page {
		height: 100%;
		display: flex;
		flex-direction: column;
	}
	
</style>
